package com.yanqu.road.logic.bussiness.giftKey;


import com.yanqu.road.entity.giftKey.GiftKeyInfo;
import com.yanqu.road.entity.giftKey.GiftKeyUse;
import com.yanqu.road.entity.giftKey.UserGiftKeyRedPacket;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class GiftKeyBussiness {

	public static List<GiftKeyUse> getUserGiftKeyUseList(long userId) {
		return DaoHelper.getGiftKeyDaoImpl().getUserGiftKeyUseList(userId);
	}

	public static boolean addUserGiftKeyUseList(List<GiftKeyUse> useList) {
		return DaoHelper.getGiftKeyDaoImpl().addGiftUseList(useList);
	}

	public static List<GiftKeyUse> getGiftKeyUseList(long userId) {
		return DaoHelper.getGiftKeyDaoImpl().getGiftKeyUseList(userId);
	}

	public static GiftKeyInfo getGiftKeyInfo(String key) {
		return DaoHelper.getGiftKeyDaoImpl().getGiftKeyInfo(key);
	}

	public static boolean addGiftKeyUse(GiftKeyUse giftKeyUse) {
		return DaoHelper.getGiftKeyDaoImpl().add(giftKeyUse);
	}

	public static int updateNormalGiftKeyUseTimes(String key) {
		return DaoHelper.getGiftKeyDaoImpl().updateNormalGiftKeyUseTimes(key);
	}

	public static int updateOnceGiftKeyUseTimes(String key) {
		return DaoHelper.getGiftKeyDaoImpl().updateOnceGiftKeyUseTimes(key);
	}

	public static Map<String, UserGiftKeyRedPacket> getUserGiftKeyRedPacket(long userId) {
		return DaoHelper.getGiftKeyRedPacketDaoImpl().getUserGiftKeyRedPacket(userId);
	}

	public static boolean updateUserGiftKeyRedPacket(UserGiftKeyRedPacket userGiftKeyRedPacket) {
		return DaoHelper.getGiftKeyRedPacketDaoImpl().update(userGiftKeyRedPacket);
	}

	public static boolean addUserGiftKeyRedPacket(UserGiftKeyRedPacket userGiftKeyRedPacket) {
		return DaoHelper.getGiftKeyRedPacketDaoImpl().add(userGiftKeyRedPacket);
	}
}
